//
//  KUserControlRequest.m
//  Peanut
//
//  Created by Jim huang on 2018/3/30.
//  Copyright © 2018年 Jim_Peanut. All rights reserved.
//

#import "KUserControlRequest.h"
#import "KUserInfoAPI.h"
@interface KUserControlRequest ()

@property (nonatomic,copy) NSString * sid;

@end

@implementation KUserControlRequest



-(instancetype)initGetUserDetail{
    
    if (self = [super initGETWithRequestUrl:KGetUserInfoURL]) {
        
    }
    return self;
    
}


/**
 修改用户信息
 
 @param nickName 昵称
 @param profile 头像
 @param sex 性别
 */
-(instancetype)initChangeUserInfoWithNickName:(NSString *)nickName profile:(NSString *)profile sex:(NSString *)sex{
    
    if (self = [super initPOSTWithRequestUrl:KChangeUserInfoURL]) {
        [self.paramsDic setValue:nickName forKey:@"nickName"];
        [self.paramsDic setValue:profile forKey:@"profile"];
        [self.paramsDic setValue:sex forKey:@"sex"];

    }
    return self;
    
}
/**
 登录后修改密码
 
 @param oldPassWord 旧密码
 @param passWord 新密码
 @param smsCode 验证码
 */
-(instancetype)initChangePWDLoginWithOldPassWord:(NSString *)oldPassWord passWord:(NSString *)passWord smsCode:(NSString *)smsCode phone:(NSString *)phone{
    if (self = [super initPOSTWithRequestUrl:KChangePWDLoginURL]) {
        [self.paramsDic setValue:oldPassWord forKey:@"oldPassWord"];
        [self.paramsDic setValue:passWord forKey:@"password"];
        [self.paramsDic setValue:smsCode forKey:@"smsCode"];
        [self.paramsDic setValue:phone forKey:@"phone"];

    }
    return self;
    
}

/**
 获取银行卡列表
 
 */
-(instancetype)initCardbagList{
    if (self = [super initGETWithRequestUrl:KGetCardBagListURL]) {
        
    }
    return self;
}

/**
 添加银行卡
 
 @param cardNo 卡号
 @param phone 手机号
 @param realyName 真实姓名
 @param smsCode 验证码
 
 */

-(instancetype)initAddCardbagWithCardNo:(NSString *)cardNo phone:(NSString *)phone realyName:(NSString *)realyName smsCode:(NSString *)smsCode{
    
    if (self = [super initPOSTWithRequestUrl:KAddCardbagURL]) {
        [self.paramsDic setValue:cardNo forKey:@"cardNo"];
        [self.paramsDic setValue:phone forKey:@"phone"];
        [self.paramsDic setValue:realyName forKey:@"realyName"];
        [self.paramsDic setValue:smsCode forKey:@"smsCode"];
        
    }
    return self;
}

/**
 删除银行卡
 
 @param key 银行卡model中的id
 */
-(instancetype)initDeleteCardbagWithKey:(NSString *)key{
    
    if (self = [super initGETWithRequestUrl:KDeleteCardbagURL]) {
        [self.paramsDic setValue:key forKey:@"key"];
    }
    return self;
    
}


/**
 修改交易密码

 @param oldTransactionPassword 旧的交易密码
 @param transactionPassword 新的交易密码
 @param smsCode 验证码
 */
-(instancetype)initChangePayPWDWithOldTransactionPassword:(NSString *)oldTransactionPassword transactionPassword:(NSString *)transactionPassword smsCode:(NSString *)smsCode{
    if (self = [super initPOSTWithRequestUrl:KChangePayPWDURL]) {
        [self.paramsDic setValue:oldTransactionPassword forKey:@"oldTransactionPassword"];
        [self.paramsDic setValue:transactionPassword forKey:@"transactionPassword"];
        [self.paramsDic setValue:smsCode forKey:@"smsCode"];
        
    }
    return self;
    
}


/**
 获取分享管理列表
 
 */
-(instancetype)initGetShareManager{
    if (self = [super initGETWithRequestUrl:KGetShareManagerURL]) {
    }
    return self;
    
}


/**
 获取分享管理好友列表

 @param roleId 角色id
 
 */
-(instancetype)initGetShareFriendListWithRoleId:(NSString *)roleId{
    if (self = [super initGETWithRequestUrl:KGetShareFriendListURL]) {
        [self.paramsDic setValue:roleId forKey:@"roleId"];
    }
    return self;
    
}

/**
 生宝提现信息
 */
-(instancetype)initSBOutInfo{
    if (self = [super initGETWithRequestUrl:KSBOutInfoURL]) {
        
    }
    return self;
    
}

/**
 生宝提现
 @param account 银行卡号
 @param amount 金额
 @param name 持卡人姓名

 */
-(instancetype)initSBOutWithAccount:(NSString *)account amount:(NSString *)amount name:(NSString *)name{
    if (self = [super initPOSTWithRequestUrl:KSBOutURL]) {
        [self.paramsDic setValue:account forKey:@"account"];
        [self.paramsDic setValue:amount forKey:@"amount"];
        [self.paramsDic setValue:name forKey:@"name"];

    }
    return self;
}

@end
